<template>
  <div>
    <up-down-layout :header="'日志管理'" :handleFlag="true" >
      <template slot="query">
        <search-form :componentList="componentList" :formValue="queryParas" @handleFilter="handleFilter"
          @clearParam="clearParam">
        </search-form>
      </template>
      <template slot="table">
        <!-- table表格 -->
         <data-table :toolMenuFlag="false" :sourceData="sourceData" :queryParas="queryParas" @onEditRow="onEditRow"
          :operateBtnLayout="operateBtnLayout" :columns="columns" :api="api" :loadCount="loadCount" :operatWidth="'100px'"
          ></data-table>
      </template>
    </up-down-layout>
  </div>
</template>
<script>
import BaseManage from '@/pages/baseManage'
import upDownLayout from '@/components/element/upDownLayout'
import searchForm from '@/components/element/searchForm'
import { sysLog } from '@/api/platformApi'
import DataTable from '@/components/element/DataTable'
export default {
  // 继承baseManage里的公共方法和定义的属性
  extends: new BaseManage(),
  name: 'logManage',
  components: {
    upDownLayout,
    searchForm,
    DataTable
  },
  data () {
    return {
      componentList: [
          // {
          //     prop: 'type',
          //     componentName: 'el-input',
          //     label: '日志类型：',
          //     lableWidth: '100px',
          //     value: 'type'
          // },
          // {
          //     prop: 'editAccount',
          //     componentName: 'el-input',
          //     label: '操作账号：',
          //     lableWidth: '100px',
          //     value: 'sex',
          //     placeholder: '请输入账号'
          // },
          {
              prop: 'requestUri',
              componentName: 'el-input',
              label: '请求路径：',
              lableWidth: '100px',
              value: 'requestUri',
              placeholder: '请输入'
          }
      ],
      queryParas: {
      },
      // table的数据源
      sourceData: [],
      // talbe显示的每一项
      columns: [
        {
          prop: 'requestUri',
          label: '请求路径',
          align: 'left'
        },
          {
          prop: 'method',
          label: '请求方式',
          align: 'center',
          width: '100px'
        },
          {
          prop: 'remoteAddr',
          label: '操作ip',
          align: 'center'
        },
        {
          prop: 'createDate',
          label: '操作时间',
          align: 'center'
        }
      ],
      operateBtnLayout: 'V'
    }
  },
  computed: {
    api () {
      return sysLog
    }
  },
  methods: {
  }
}
</script>
